import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/income_order_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class IncomeOrderListEntity {
  int? total;
  String? sumAmount;
  String? plusAmount;
  String? minusAmount;
  List<IncomeOrderInfo>? data;
  bool? hasBoxPermission;

  IncomeOrderListEntity();

  factory IncomeOrderListEntity.fromJson(Map<String, dynamic> json) =>
      $IncomeOrderListEntityFromJson(json);

  Map<String, dynamic> toJson() => $IncomeOrderListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IncomeOrderInfo {
  String? id;
  String? attach;
  String? creatorName;
  int? createdAt;
  int? updatedAt;
  String? uid;
  String? title;
  String? pTitle;
  int? orderAmount;
  int? payAmount;
  int? invoicedAt;
  String? mobile;
  int? collectionDate;
  int? orderType;
  String? invoice;
  int? invoiceStatus;
  String? allocContent;
  dynamic failReason;
  String? remark;
  int? flowId;
  String? operatorUid;
  String? editor;
  String? marginAmount;
  String? marginDate;
  String? creator;
  int? orderStatus;
  IncomeOrderSettle? settle;
  String? orderAmountStr;
  String? payAmountStr;

  IncomeOrderInfo();

  factory IncomeOrderInfo.fromJson(Map<String, dynamic> json) =>
      $IncomeOrderInfoFromJson(json);

  Map<String, dynamic> toJson() => $IncomeOrderInfoToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class IncomeOrderSettle {
  String? ratio;
  String? settleAmount;

  IncomeOrderSettle();

  factory IncomeOrderSettle.fromJson(Map<String, dynamic> json) =>
      $IncomeOrderSettleFromJson(json);

  Map<String, dynamic> toJson() => $IncomeOrderSettleToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
